package models

import (
	"gorm.io/gorm"
)

type Employee struct {
	gorm.Model
	Name     string `gorm:"column:name;type:varchar(32);" json:"name"`
	Username string `gorm:"column:username;type:varchar(32);" json:"username"`
	Password string `gorm:"column:password;type:varchar(64);" json:"password"`
	Phone    string `gorm:"column:phone;type:varchar(11);" json:"phone"`
	Sex      string `gorm:"column:sex;type:varchar(2);" json:"sex"`
	IdNumber string `gorm:"column:id_number;type:varchar(18);" json:"id_number"`
	Status   int    `gorm:"column:status;type:int(2);" json:"status"`
}

func (Employee) TableName() string {
	return "employee"
}
